<template>
  <div>
    <h1>{{detailData.productName}}</h1>
    <div v-html="detailData.detail"></div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        detailData: {}
      };
    },
    methods: {
      getdata(id) {
        this.$axios({
          methods: 'get',
          url: `http://api.mm2018.com:8095/api/goods/productDet?productId=${id}`
        }).then(res => {
          //console.log(res.data)
          this.detailData = res.data
        })
      }
    },
    created() {
      var pid = this.$route.query.productid;
      this.getdata(pid)
    }
  };
</script>

<style>

</style>
